package srvbiz

import (
	"cloud_worm/access/server/client"
	"cloud_worm/access/server/rpcclient"
	"time"
)

type MsgPush struct {
}

func (p *MsgPush) Deal(agent *client.Agent, data []byte) {
	push := &rpcclient.PushMsg{
		AgentId: agent.Id,
		AgentIP: agent.IP,
		TimeStamp: time.Now().Format("2006-01-02 15:04:05"),
		PayLoad: data,
		NeedAgain: false,
	}

	rpcclient.PushClient.PushOneC <- push
	return
}
